package cn.tt.core.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Description
 * 		1)对应BootStrap.yml的资源文件，注入Bean的方式，可以通过SpringContextHolder.getBean(BootstrapProperties.class)获取
 * 		2)第二种方式，直接通过PropertiesLoader加载配置文件
 * 				PropertiesLoader propertiesLoader = new PropertiesLoader("/bootstrap.yml");
 * @Date 2017/7/29 8:15
 * @Since v1.7
 * @Autor Nick
 */
@Component
@Configuration
@ConfigurationProperties(prefix = "cn.tt")
@PropertySource(value = "classpath:bootstrap.yml", encoding = "UTF-8")
@Data
public class BootstrapProperties {

	private String productName;

	private String version;

	private String author;

}
